Skip to content

:bug fix(auth-refresh): update supertokens-node and add refresh failure logging#1170

Merged
victor-enogwe merged 5 commits intomainfrom
fix-failing-auth-refresh-1152
Oct 27, 2025
Merged

:bug fix(auth-refresh): update supertokens-node and add refresh failure logging#1170
victor-enogwe merged 5 commits intomainfrom
fix-failing-auth-refresh-1152

Conversation

@victor-enogwe
Copy link
Contributor

@victor-enogwe victor-enogwe commented Oct 26, 2025

What does this PR do?

This PR updates the supertokens-node package from v20.1.7 to v23.0.1. It also adds logging for the supertokens refresh endpoint failure and prevents the websocket server's session verification from triggering the refresh endpoint.

Use Case

closes #1152

Copilot AI review requested due to automatic review settings October 26, 2025 16:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses session refresh handling by upgrading the supertokens-node package from v20.0.5 to v23.0.1 and implementing explicit error handling for failed refresh token attempts. The changes add logging when users attempt to refresh expired sessions and return a clear error response.

Key changes:

  • Upgraded supertokens-node from v20.0.5 to v23.0.1
  • Added onTryRefreshToken error handler with logging and custom error response
  • Imported necessary dependencies (Status codes and Logger)

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/backend/src/common/middleware/supertokens.middleware.ts Added error handler for refresh token failures with logging and explicit 401 response
packages/backend/package.json Updated supertokens-node dependency to v23.0.1

Copilot AI review requested due to automatic review settings October 27, 2025 07:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings October 27, 2025 08:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

@victor-enogwe victor-enogwe merged commit 004900a into main Oct 27, 2025
5 checks passed
@victor-enogwe victor-enogwe deleted the fix-failing-auth-refresh-1152 branch October 27, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User is required to re-auth frequently | 401 response from /api/auth/google

2 participants